package com.smedi.ismedi.cronjob.core.application.service;

import com.smedi.ismedi.cronjob.core.application.command.JobInfoCommand;
import com.smedi.ismedi.cronjob.core.application.command.JobRunCommand;
import com.smedi.ismedi.cronjob.core.domain.aggregatemodel.JobInfo;
import com.smedi.ismedi.cronjob.core.domain.aggregatemodel.JobRun;

import java.util.List;

/**
 * @author u
 */
public interface JobApplicationService {

    Boolean runJob(JobInfoCommand jobInfoCommand);

    Boolean pauseJob(JobInfoCommand jobInfoCommand);

    Boolean resumeJob(JobInfoCommand jobInfoCommand);

    Boolean refreshJob(JobInfoCommand jobInfoCommand);

    List<JobInfo> restartAllJob();

    JobInfo insertJob(JobInfoCommand jobInfoCommand);

    boolean deleteJob(JobInfoCommand jobInfoCommand);

    JobInfo updateJob(JobInfoCommand jobInfoCommand);

    JobInfo getJob(Long id);

    List<JobInfo> listJob(JobInfoCommand jobInfoCommand);

    JobRun updateJobRun(JobRunCommand jobRunCommand);

    JobRun getJobRun(Long id);

    List<JobRun> listJobRun(JobRunCommand jobRunCommand);
}
